<template>
    <el-date-picker
            :type="type"
            :disabled="disabled"
            @change="change"
            :size="size"
            placeholder="选择日期"
            :range-separator="rangeSeparator"
            :start-placeholder="startPlaceholder"
            :end-placeholder="endPlaceholder"
            :clearable="clearable"
            v-bind="$attrs"
            v-on="$listeners"
            >
    </el-date-picker>
</template>

<script>
    export default {
        value:String,
        data() {
            return {
                value : ''
            }
        },
        props: {
            disabled: Boolean,
            size:String,
            type:String,
            endPlaceholder:String,
            startPlaceholder:String,
            rangeSeparator:String,
            clearable:true,
        },
        methods: {
            change(val) {
                console.log(val);
                this.$emit('change', val, this.value)
            }
        }
    }
</script>
